Drop unused code
authorMatthias Clasen <mclasen@redhat.com>
Sat, 13 Sep 2014 02:31:25 +0000 (22:31 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 13 Sep 2014 02:31:25 +0000 (22:31 -0400)
Not worth keeping this around.

gtk/gtkdnd.c

index 16a095d795e19de56b006f6d1d1b72cda0b586e3..6d2ad0e83d7d41544bf8d102262b8564e2063f95 100644 (file)
@@ -935,84 +935,6 @@ gtk_drag_get_cursor (GtkWidget         *widget,
           ensure_drag_cursor_pixbuf (i);
           cursor_surface = gdk_cairo_surface_create_from_pixbuf (drag_cursors[i].pixbuf, 1, NULL);
         }
-      else
-        {
-#if 0     
-          /* The code below is an attempt to let cursor themes
-           * determine the attachment of the icon to enable things
-           * like the following:
-           *
-           *    +-----+
-           *    |     |
-           *    |     ||
-           *    +-----+|
-           *        ---+
-           * 
-           * It does not work since Xcursor doesn't allow to attach
-           * any additional information to cursors in a retrievable
-           * way  (there are comments, but no way to get at them
-           * short of searching for the actual cursor file).
-           * If this code ever gets used, the icon_window placement
-           * must be changed to recognize these placement options
-           * as well. Note that this code ignores info->hot_x/y.
-           */ 
-          for (j = 0; j < 10; j++)
-            {
-              const gchar *opt;
-              gchar key[32];
-              gchar **toks;
-              GtkAnchorType icon_anchor;
-
-              g_snprintf (key, 32, "comment%d", j);
-              opt = gdk_pixbuf_get_option (cursor_pixbuf, key);
-              if (opt && g_str_has_prefix ("icon-attach:", opt))
-                {
-                  toks = g_strsplit (opt + strlen ("icon-attach:"), "'", -1);
-                  if (g_strv_length (toks) != 3)
-                    {
-                      g_strfreev (toks);
-                      break;
-                    }
-                  icon_anchor = atoi (toks[0]);
-                  icon_x = atoi (toks[1]);
-                  icon_y = atoi (toks[2]);
-                  
-                  switch (icon_anchor)
-                    {
-                    case GTK_ANCHOR_NORTH:
-                    case GTK_ANCHOR_CENTER:
-                    case GTK_ANCHOR_SOUTH:
-                      icon_x += icon_width / 2;
-                      break;
-                    case GTK_ANCHOR_NORTH_EAST:
-                    case GTK_ANCHOR_EAST:
-                    case GTK_ANCHOR_SOUTH_EAST:
-                      icon_x += icon_width;
-                      break;
-                    default: ;
-                    }
-                  
-                  switch (icon_anchor)
-                    {
-                    case GTK_ANCHOR_WEST:
-                    case GTK_ANCHOR_CENTER:
-                    case GTK_ANCHOR_EAST:
-                      icon_y += icon_height / 2;
-                      break;
-                    case GTK_ANCHOR_SOUTH_WEST:
-                    case GTK_ANCHOR_SOUTH:
-                    case GTK_ANCHOR_SOUTH_EAST:
-                      icon_x += icon_height;
-                      break;
-                    default: ;
-                    }
-
-                  g_strfreev (toks);
-                  break;
-                }
-            }
-#endif
-        }
 
       get_surface_size (cursor_surface, &cursor_width, &cursor_height);